package com.ttx.pattern.example.chain.tomcat.filterchain;

import com.ttx.pattern.example.chain.tomcat.servlet.ServletRequest;
import com.ttx.pattern.example.chain.tomcat.servlet.ServletResponse;

/**
 * 参考 javax.servlet.FilterChain
 *
 * @author TimFruit
 * @date 19-5-11 下午6:08
 */
public interface FilterChain {
    /**
     * Causes the next filter in the chain to be invoked, or if the calling
     * filter is the last filter in the chain, causes the resource at the end of
     * the chain to be invoked.
     *
     * @param request
     *            the request to pass along the chain.
     * @param response
     *            the response to pass along the chain.
     *
     */
    public void doFilter(ServletRequest request, ServletResponse response);
}
